import {SET_USERINFO,DELETE_USERINFO} from '../action-type'

export const setUserInfo = (value) => {
    window.localStorage.setItem('uinfo',JSON.stringify(value.userInfo));
    window.localStorage.setItem('admin_jwt_token',value.token);
    return {type:SET_USERINFO, data:value}
}
export const deleteUserInfo = () => {
    window.localStorage.removeItem('uinfo');
    window.localStorage.removeItem('admin_jwt_token');
    return {type:DELETE_USERINFO, data:''}
}